import java.util.LinkedList;
import java.util.List;


public class Devision {
	List<Double> list = new LinkedList<Double>();
	void devision(int n) {
		SimpleArray arr = new SimpleArray(); 
		int[] array = arr.getSimpleArray(n);
		int i = 0;
		double result = n;
		int kratnost = 0;
		while(array[i] == 0) {
			i++;
		}
		list.add(result);
		int index = 0;
		System.out.println("test");
		int mult = array[i];
		while ((i < array.length)&&(result != 1)) {
			if (list.get(index) % mult == 0) {
				kratnost++;
				result = result/mult;
				list.add(result);
				index++;
				//System.out.println("result = "+result);
				//System.out.println("mult =" +mult);
			}
			else {
				//System.out.println("kratnost = "+kratnost+" prime = "+ mult);
				kratnost = 0;
				i++;
				while (array[i] == 0) {
					i++;
				}
				if (i < array.length)
					mult = array[i];
				index++;
				list.add(result);
			}
		}
		//System.out.println("kratnost = "+kratnost+" prime = "+mult);
	}
	List getList() {
		return this.list;
	}
}
